package com.test1230am;

public class Test02 {
    public static void main(String[] args) {
        // (2)打印3个变量中的最大值
        int a = 2;
        int b = 3;
        int c = 5;
        int max = m(a,b,c);
        System.out.println("三个变量最大值为"+max);
    }
    public static int m(int ... nums){
        int max = nums[0];
        for(int i = 1;i<nums.length;i++)
            if(max<nums[i]){
                max = nums[i];
            }
        return max;
    }
}
